package net.sx.minemodule.mvp.item;

import com.kedll.library.mvp.BaseItem;

import net.sx.minemodule.R;
import net.sx.minemodule.mvp.bean.PackageInfoBean;

/**
 * @author 11470
 */
public class TestPackageInfoItem extends BaseItem<PackageInfoBean> {

    public TestPackageInfoItem(PackageInfoBean data) {
        super(data);
    }

    @Override
    public int getLayout() {
        return R.layout.mine_item_package_info;
    }

    public String getType() {
        return getData().getType();
    }

    public String getMoney() {
        return getData().getMoney();
    }

    public String getBalance() {
        return "余额: " + getData().getBalance();
    }

    public String getDate() {
        return getData().getDate();
    }

    public int textColor() {
        switch (getData().getType()) {
            case "充值":
                return R.color.color_d63737;
            case "消费":
                return R.color.color_50be3d;
            default:
                return R.color.color_d63737;

        }
    }


}
